package cn.iocoder.yudao.module.member.enums;

import cn.hutool.core.util.EnumUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * 会员账变类型
 */

@Getter
@AllArgsConstructor
public enum FrzonStatusEnum {

    FROZEN(1, "冻结中"),

    FINISHED(2, "已完成"),

    FALLBACK(3, "退回余额");

    /**
     * 业务类型
     */
    private final int type;
    /**
     * 标题
     */
    private final String title;

    public static FrzonStatusEnum getByType(Integer type) {
        return EnumUtil.getBy(FrzonStatusEnum.class,
                e -> Objects.equals(type, e.getType()));
    }
}
